use case::CaseExt;
use thiserror::Error;


#[derive(Debug,Error)]
pub enum MyError {
    #[error("未查询到用户")]
    UserNotFound,
}


#[test]
fn test_1(){

    let msg = MyError::UserNotFound.to_string();
    println!("{msg}");

    let code = format!("{:?}", MyError::UserNotFound);
    let code = code.to_snake().to_uppercase();

    println!("{:?}", code);

  

}